# !/usr/bin/env python
# coding=utf-8
# @Time    : 2017/12/28 10:04
# @Author  : 6imensiva
# @Site    : https://gitee.com/dimensiva/wx_server_prototype.git
# @File    : my_exception.py
# @Software: PyCharm
# @Version: 3.5.4


class MyException(Exception):
	def __init__(self, value, code=None):
		if code:
			value += '#' + str(code)
		self.value = '[MyException:' + value + ']'
	def __str__(self):
		return repr(self.value)


def aaa():
	raise MyException('asdada', 123123)


if __name__ == '__main__':
	# try:aaa()
	# except Exception, e:print e
	aaa()